#ifndef DTLIBRARY_H
#define DTLIBRARY_H
#include <QString>
#include <QHash>
#include <QDebug>
class DtLibrary
{
private:
    QString library;
    bool load;
public:
    DtLibrary();
    /**
     * @brief operator << is use for the debbugging with Qt. See the Qt Doc to
     *find more help on this function
     * @param dbg the stream of debugging
     * @param library the library to show
     * @return
     */
    friend QDebug operator<<(QDebug dbg, const DtLibrary &library);
    void setLibrary(const QString & library);
    QString getLibrary() const;
    bool getLoad() const;
    void setLoad(const bool load);
};

/**
 * @brief operator == is use for the QSet container.
 * @param library1
 * @param library2
 * @return
 */
inline bool operator==(const DtLibrary &library1, const DtLibrary &library2)
{
    return (library1.getLibrary() == library2.getLibrary());
}

/**
 * @brief qHash is use for the QSet container too
 * @param library
 * @return
 */
inline uint qHash(const DtLibrary & library)
{
    return qHash(library.getLibrary().toUpper());
}

#endif // DTLIBRARY_H
